{% extends "../base.html" %}

{% block title %}Edit role{% endblock %}
{% block header %}Edit role{% endblock %}

{% block content %}
		<a href="/projects">Projects</a>/
		<a href="/editProjectForm?projectId={{ role.project.key }}">Project</a>/
		<a href="/roles?projectId={{ role.project.key }}">Roles</a>

		<form method="POST" action="/saveRole">
			<table>
				<tr>
					<td>
						<label for="roleName">Role name: </label>
					</td>
					<td>
						<input id="roleName" name="roleName" value="{{ role.name }}"></input>		
					</td>
				</tr>
				<tr>
					<td>
						<label for="canEditProject">Can edit project: </label>
					</td>
					<td>
						<input id="canEditProject" type="checkbox" name="canEditProject" {% if role.canEditProject %} checked="checked" {% endif %}></input>		
					</td>
				</tr>
				<tr>
					<td>
						<label for="canAssign">Can assign tasks: </label>
					</td>
					<td>
						<input id="canAssign" type="checkbox" name="canAssign" {% if role.canAssign %} checked="checked" {% endif %}></input>		
					</td>
				</tr>
				<tr>
					<td>
						<label for="canBeAssigned">Can be assigned: </label>
					</td>
					<td>
						<input id="canBeAssigned" type="checkbox" name="canBeAssigned" {% if role.canBeAssigned %} checked="checked" {% endif %}></input>		
					</td>
				</tr>
			</table>
			
			<input type="hidden" name="roleId" value="{{ role.key }}"></input>
			<input type="submit" value="Save"></input>
		</form>
{% endblock %}
